package ProjectManagement;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(name = "courseshow",value = "/courseshow")
public class courseshow extends HttpServlet {

    private static final long serialVersionUID = 1L;

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        doPost(request, response);
    }

    public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        courseshow(request,response);
    }
    /**
     * 确认学生选课-实现页面跳转
     * @param request
     * @param response
     * @throws ServletException
     * @throws IOException
     */
    public void courseshow(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException{
        String mainPage = "courseshow.jsp";
        request.setAttribute("mainPage", mainPage);
        RequestDispatcher dispatcher = request.getRequestDispatcher("/ProjectManagement/main.jsp");
        dispatcher.forward(request, response);
    }
}